home *** CD-ROM | disk | FTP | other *** search
/ BMUG PD-ROM 1995 Fall / PD-ROM F95.toast / Programming / Programming Utilities / ViewIt 2.04 ƒ / ViewIt™ 2.04 Shareware / FaceWare / FaceWare.rsrc / TEXT_1321_BC11. Examples.txt < prev    next >
Encoding:
Text File  |  1992-08-16  |  10.0 KB  |  163 lines

  1. Example Controls
  2.   The FCTLs numbered 1311 to 1333 in the Import menu (the "+" menu) are examples of BaseCt-based controls.  A brief desription of each example control is presented below to help you understand how the controls can be modified to suit your own purposes.
  3.  
  4. 1311 Static Box
  5. Use:  as transparent box around other controls
  6. Setup:  not solid, no title, non-zero frame pen size, static, no resource link
  7. Common Variations:  frame size, roundness, color
  8. Data Link:  not applicable
  9. More Info:  see "Static Text" topic
  10.  
  11. 1312 Static Text
  12. Use:  displays control title as static text
  13. Setup:  not solid, non-empty title, no frame, static, no resource link
  14. Common Variations:  text font, size, style, color
  15. Data Link:  control title <-> any program variable
  16. More Info:  see "Static Text" topic
  17.  
  18. 1313 Editable Text
  19. Use:  displays editable text (initially equal to title)
  20. Setup:  solid, 1-pixel frame, 2-pixel indent, editable, no resource link, Idle message
  21. Common Variations:  text font, size, style, color
  22. Data Link:  editable text <-> any program variable
  23. More Info:  see "Editable Text" topic
  24.  
  25. 1314 Ed Text & Style
  26. Use:  displays editable text (initially equal to title) with user-selectable text style (via FSSC menus)
  27. Setup:  solid, 1-pixel frame, 2-pixel indent, editable, no resource link, Idle message, "Supports FSSC" option checked (supports FSSC menus)
  28. Common Variations:  text font, size, style, color
  29. Data Link:  editable text <-> any program variable
  30. More Info:  see "Editable Text" topic
  31.  
  32. 1315 clut Pop-Up
  33. Use:  displays color from linked clut resource and pops up color palette when clicked
  34. Setup:  solid, 1-pixel frame, 1-pixel indent, has shadow, "List or Menu" type, linked to a clut (Min = first, Max = last, Value = current clut index)
  35. Common Variations:  frame and body color
  36. Data Link:  control value <-> integer variable
  37. More Info:  see "Pop-Up Palettes" topic
  38.  
  39. 1316 Color Picker
  40. Use:  displays control's content color and opens Color Picker or pops up color palette when clicked
  41. Setup:  solid, 1-pixel frame, 1-pixel indent, has shadow, "List or Menu" type, linked to clut 1310
  42. Common Variations:  frame and body color
  43. Data Link:  content color <-> RGB program variable
  44. More Info:  see "Color Pickers" topic
  45.  
  46. 1317 ICON Icon
  47. Use:  displays static linked ICON resource
  48. Setup:  solid, no frame, static, linked to ICON
  49. Common Variations:  sometimes used as Button, Check Box, or Radio Button
  50. Data Link:  rarely applicable
  51. More Info:  see "Icons, Picts, ..." topic
  52.  
  53. 1318 MENU Flags
  54. Use:  pops up linked MENU resource when clicked and toggles selected items on/off (checked/unchecked)
  55. Setup:  solid, centered title, 1-pixel frame, shadow, "List or Menu" type, linked to MENU, VarCode = 2 (arrow in title) + 8 (auto-process selections) + 32 (center title vertically)
  56. Common Variations:  text font, size, style, color
  57. Data Link:  32 bit flags corresponding to checked state of menu items <-> integer variable
  58. More Info:  see "Menu Controls" topic
  59.  
  60. 1319 MENU Pop-Up
  61. Use:  pops up linked MENU resource when clicked and checks selected item (unchecking all others)
  62. Setup:  solid, centered title, 1-pixel frame, shadow, "List or Menu" type, linked to MENU, VarCode = 1 (single selection) + 4 (display menu above control) + 8 (auto-process selections)
  63. Common Variations:  text font, size, style, color, addition of arrow (add 2 to VarCode)
  64. Data Link:  checked item # <-> integer variable
  65. More Info:  see "Menu Controls" topic
  66.  
  67. 1320 MENU Pull-Down
  68. Use:  pops up linked MENU resource when clicked but does not auto-check/uncheck any menu selections
  69. Setup:  solid, centered title, 1-pixel vertical pen size, 0-pixel horizontal pen, "List or Menu" type, linked to MENU, VarCode = 0
  70. Common Variations:  frame size and thickness, shadow, text font, size, style, color, arrow in title
  71. Data Link:  not applicable
  72. More Info:  see "Menu Controls" topic
  73.  
  74. 1321 Style Picker
  75. Use:  pops up linked MENU resource that contains hierarchical items linked to UtilIt's standard Font, Size, Style, and Color (FSSC) menus (performs same role as the above A icon menu in this window)
  76. Setup:  solid, empty title, 1-pixel frame, shadow, "List or Menu" type, linked to MENU, VarCode = 2 (show down arrow)
  77. Common Variations:  frame size and thickness, non-empty title, text font, size, style, color
  78. Data Link:  not applicable
  79. More Info:  see "Menu Controls" topic
  80.  
  81. 1322 PAT# Pattern
  82. Use:  displays pattern from linked PAT# resource
  83. Setup: solid, no frame, static, linked to a PAT# (Min = first, Max = last, Value = current PAT# index, OR Min = 0, Max = PAT# index, Value = 0)
  84. Common Variations:  content color
  85. Data Link:  control value <-> integer variable
  86. More Info:  see "Icons, Picts, ..." topic
  87.  
  88. 1323 PAT# Pop-Up
  89. Use:  displays pattern from linked PAT# resource and pops up pattern palette when clicked
  90. Setup:  solid, 1-pixel frame, 1-pixel indent, has shadow, "List or Menu" type, linked to a PAT# (Min = first, Max = last, Value = current PAT# index)
  91. Common Variations:  frame, body, & content color
  92. Data Link:  control value <-> integer variable
  93. More Info:  see "Pop-Up Palettes" topic
  94.  
  95. 1324 SICN Arrows
  96. Use:  displays small icons from linked SICN resource that act like buttons when clicked
  97. Setup:  solid, no frame, non-zero Max V and Max H content, "Button" type, returns control on hit, linked to an SICN (Min = unhilited, Max = hilited, Value = current state as index into SICN list)
  98. Common Variations:  frame, body, & content color, indent and content size (the 0 indent used in these examples may need to be changed for other SICN lists to get the small icons drawn in the desired position)
  99. Data Link:  not applicable to buttons
  100. More Info:  see "Btn, Chk, & Rad" topic
  101.  
  102. 1325 SICN Chk Box
  103. Use:  displays small icon from linked SICN resource and acts like a check box when clicked (this example mimics the standard check box)
  104. Setup:  solid, no frame, left-justified, "Check Box" type, VarCode = 32 (align according to justification, center vertically, and display title), and linked to an SICN (Min = unchecked, Min + 1 = hilited unchecked, Max - 1 = hilited checked, Max = checked, Value = current state as index into SICN list)
  105. Common Variations:  body & content color
  106. Data Link:  control value <-> integer variable where an unchecked (Value = Min) control returns 0 to the program, and checked (Value = Max) returns 1
  107. More Info:  see "Btn, Chk, & Rad" topic
  108.  
  109. 1326 SICN Rad Btn
  110. Use:  displays small icon from linked SICN resource and acts like radio button when clicked (this example mimics the standard radio button)
  111. Setup: solid, no frame, left-justified, "Radio Button" type, VarCode = 32 (align according to justification, center vertically, and display title), and linked to an SICN (Min = unchecked, Min + 1 = hilited unchecked, Max - 1 = hilited checked, Max = checked, Value = current state as index into SICN list)
  112. Common Variations:  body & content color
  113. Data Link:  control value <-> integer variable where an unchecked (Value = Min) control returns 0 to the program, and checked (Value = Max) returns 1
  114. More Info:  see "Btn, Chk, & Rad" topic
  115.  
  116. 1327 SICN Pop-Up
  117. Use:  displays small icon from linked SICN resource and pops up small icon palette when clicked
  118. Setup:  solid, 1-pixel frame, non-zero Max V and Max H content, negative indent, has shadow, "List or Menu" type, linked to an SICN (Min = first, Max = last, Value = current SICN index)
  119. Common Variations:  frame, body, & content color, indent and content size (the -1 indent and non-zero content Max V and Max H seen in the example pop-up are used to align the drawn icon within the small content area of the control - you may need to change these settings when using other SICN lists)
  120. Data Link:  control value <-> integer variable
  121. More Info:  see "Pop-Up Palettes" topic
  122.  
  123. 1328 STR# Text
  124. Use:  displays control title as static text, replacing "^1", "^2", etc., with strings from linked STR#
  125. Setup:  solid, title with "^n" substrings, no frame, static, linked to STR#, Min = Max = Value = 0
  126. Common Variations:  text font, size, style, color
  127. Data Link:  control title <-> any program variable
  128. More Info:  see "Static Text" topic
  129.  
  130. 1329 STR# List
  131. Use:  displays scrollable list of strings from linked STR# resource
  132. Setup:  solid, 1-pixel thick frame, "List or Menu" type, linked to STR#, VarCode = 128 (single select)
  133. Common Variations:  font, size, style, color, and many VarCode options
  134. Data Link:  selected item # <-> integer variable
  135. More Info:  see "Scrollable Lists" topic
  136.  
  137. 1330 STR# 3D Button
  138. Use:  displays resource (in this case cicn) defined by string in linked STR# and acts as button when clicked
  139. Setup:  solid, no frame, "Button" type, returns on hit, linked to an STR# list (Min = unhilited, Max = hilited, Value = current state as index into STR#), VarCode = 32 (align according to justification, center vertically, and display title) + 64 (don't draw mask)
  140. Common Variations:  left or right title alignment when mimicking check boxes and radio buttons
  141. Data Link:  not applicable to buttons
  142. More Info:  see "Btn, Chk, & Rad" topic
  143.  
  144. 1331 Dial Bar
  145. Use:  displays current control value as solid bar in control's content area
  146. Setup:  solid, 1-pixel thick frame, "Dial Control" type, Value - Min / Max - Min determines bar size
  147. Common Variations:  frame, body, & content color, frame and indent size, orientation, VarCode options
  148. Data Link:  control value <-> integer or real
  149. More Info:  see "Dial Controls" topic
  150.  
  151. 1332 Dial Round
  152. Use:  displays current control value as wedge in rounded control's content area
  153. Setup:  solid, 1-pixel thick frame, 2-pixel indent, rounded, "Dial Control" type, Value - Min / Max - Min determines wedge position, VarCode = 2 (round dial) + 4 (fill current value only)
  154. Common Variations:  frame, body, & content color, frame and indent size, VarCode options
  155. Data Link:  control value <-> integer or real
  156. More Info:  see "Dial Controls" topic
  157.  
  158. 1333 Dial w/ Thumb
  159. Use:  displays current control value as "thumb" box in control's content area
  160. Setup:  solid, 1-pixel thick frame, "Dial Control" type, Value - Min / Max - Min determines thumb position, VarCode = 4 (fill current value only)
  161. Common Variations:  frame, body, & content color, frame and indent size, orientation, VarCode options
  162. Data Link:  control value <-> integer or real
  163. More Info:  see "Dial Controls" topic